﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Wise.Entities
{
    /// <summary>
    /// Tupe是只读的
    /// </summary>
    public class MyTuple<TItem1>
    {
        public MyTuple()
        {

        }
        public MyTuple(TItem1 i1)
        {
            Item1 = i1;
        }

        public TItem1 Item1 { get; set; }

        public override string ToString()
        {
            if (Item1 == null)
                return "NULL";
            return Item1.ToString();
        }
    }

    public class MyTuple<TItem1,TItem2>:MyTuple<TItem1>
    {
        public MyTuple():base()
        {

        }
        public MyTuple(TItem1 i1):base(i1)
        {

        }
        public MyTuple(TItem1 i1, TItem2 i2) : base(i1)
        {
            Item2 = i2;
        }
        public TItem2 Item2 { get; set; }

        public override string ToString()
        {
            return string.Concat(base.ToString(), ",", Item2 == null?"NULL":Item2.ToString());
        }
    }
    public class MyTuple<TItem1, TItem2, TItem3> : MyTuple<TItem1, TItem2>
    {
        public MyTuple() : base()
        {

        }
        public MyTuple(TItem1 i1) : base(i1)
        {

        }
        public MyTuple(TItem1 i1, TItem2 i2) : base(i1,i2)
        {
            Item2 = i2;
        }
        public MyTuple(TItem1 i1, TItem2 i2,TItem3 i3) : base(i1, i2)
        {
            Item3 = i3;
        }
        public TItem3 Item3 { get; set; }
        public override string ToString()
        {
            return string.Concat(base.ToString(), ",", Item3 == null ? "NULL" : Item3.ToString());
        }
    }
    public class MyTuple<TItem1, TItem2, TItem3, TItem4> : MyTuple<TItem1, TItem2, TItem3>
    {
        public MyTuple() : base()
        {

        }
        public MyTuple(TItem1 i1) : base(i1)
        {

        }
        public MyTuple(TItem1 i1, TItem2 i2) : base(i1, i2)
        {
            Item2 = i2;
        }
        public MyTuple(TItem1 i1, TItem2 i2, TItem3 i3) : base(i1, i2, i3)
        {
            Item3 = i3;
        }

        public MyTuple(TItem1 i1, TItem2 i2, TItem3 i3,TItem4 i4) : base(i1, i2, i3)
        {
            Item4 = i4;
        }

        public TItem4 Item4 { get; set; }
        public override string ToString()
        {
            return string.Concat(base.ToString(), ",", Item4 == null ? "NULL" : Item4.ToString());
        }
    }

    public class MyTuple<TItem1, TItem2, TItem3, TItem4, TItem5> : MyTuple<TItem1, TItem2, TItem3, TItem4>
    {
        public MyTuple() : base()
        {

        }
        public MyTuple(TItem1 i1) : base(i1)
        {

        }
        public MyTuple(TItem1 i1, TItem2 i2) : base(i1, i2)
        {
            Item2 = i2;
        }
        public MyTuple(TItem1 i1, TItem2 i2, TItem3 i3) : base(i1, i2, i3)
        {
            Item3 = i3;
        }

        public MyTuple(TItem1 i1, TItem2 i2, TItem3 i3, TItem4 i4) : base(i1, i2, i3)
        {
            Item4 = i4;
        }

        public MyTuple(TItem1 i1, TItem2 i2, TItem3 i3, TItem4 i4, TItem5 i5) : base(i1, i2, i3,i4)
        {
            Item5 = i5;
        }

        public TItem5 Item5 { get; set; }
        public override string ToString()
        {
            return string.Concat(base.ToString(), ",", Item5 == null ? "NULL" : Item5.ToString());
        }
    }
}
